{% extends 'base.html' %}
{% block title %}登录{% endblock %}
{% block content %}
    <h1>登录</h1>
    {% for message in get_flashed_messages() %}
        <span style="color: red">{{ message }}</span>
    {% endfor %}
    <form action="" method="post" name="login">
        {{ form.hidden_tag() }}
        <p>
            {{ form.email.label }}<br/>
            {{ form.email(size=50) }}<br/>
            {% for error in form.errors.email %}
                <span style="color: red">[{{ error }}]</span>
            {% endfor %}
        </p>

        <p>
            {{ form.password.label }}<br/>
            {{ form.password(size=50) }}<br/>
            {% for error in form.errors.password %}
                <span style="color: red">[{{ error }}]</span>
            {% endfor %}
        </p>

        <p>
            {{ form.remember_me }}{{ form.remember_me.label }}
        </p>

        <p><input type="submit" value="登录"></p>
    </form>

{% endblock %}